Text Job Format (Direct) Mode
QuickDraw GX provides a text job format mode, sometimes called a direct mode, to format a document to optimize for particular features and capabilities of a device. For example, text mode provides a fast way to print text using the built-in fonts on a device. This feature provides a replacement for draft printing, which was available in previous versions of the printing architecture.QuickDraw GX defines query types in the query type enumeration to be used with the gxQueryType data type:
enum { /* query types */ gxGetJobFormatLineConstraintQuery = (gxQueryType) 0, gxGetJobFormatFontsQuery = (gxQueryType) 1, gxGetJobFormatFontCommonStylesQuery = (gxQueryType) 2, gxGetJobFormatFontConstraintQuery = (gxQueryType) 3, gxSetStyleJobFormatCommonStyleQuery = (gxQueryType) 4 }; typedef long gxQueryType;Constant descriptions
QuickDraw GX defines constraint ranges for the constraint table in the constraint range enumeration:
gxGetJobFormatLineConstraintQuery
- Used to determine line constraint characteristics.
gxGetJobFormatFontsQuery
- Used to determine font information.
gxGetJobFormatFontCommonStylesQuery
- Used to determine the style name, such as "normal" or "bold."
gxGetJobFormatFontConstraintQuery
- Used to determine font positioning constraints.
gxSetStyleJobFormatCommonStyleQuery
- Used to set style contents.
enum { gxConstraintRange = -1 };QuickDraw GX stores constraint information in the position constraint table information structure:
struct gxPositionConstraintTable { gxPoint phase; gxPoint offset; long numSizes; Fixed sizes[1]; };QuickDraw GX stores style information in the style name table information structure:
Field Description
phase
- Where to start from the upper-left corner of the page.
offset
- The distance between legal character positions.
numSizes
- The number of sizes.
sizes[1]
- An array of sizes.
struct gxStyleNameTable{ long numStyleNames; Str255 styleNames[1]; };QuickDraw GX stores font information in the font table information structure:
Field Description
numStyleNames
- The number of style names.
styleNames[1]
- An array of strings containing any number of style names.
struct gxFontTable { long numFonts; gxFont fonts[1]; };
Field Description
numFonts
- The number of fonts.
fonts
- An array of fonts.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help